package com.sen.mybatis.service.impl;

import com.sen.mybatis.entity.User;
import com.sen.mybatis.mapper.UserMapper;
import com.sen.mybatis.service.UserService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author 王浩森
 * @since 2021-01-16
 */
@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements UserService {

    @Override
    public List<User> findUsers() {
        return getBaseMapper().findUsers();
    }

    @Override
    public User login(String userName, String password) {
        return getBaseMapper().login(userName,password);
    }

    @Override
    public User getUserById(Integer userId) {
        return getBaseMapper().getUserById(userId);
    }

    @Override
    public User updateVo(Integer userId, String userName) {
        return getBaseMapper().updateVo(userId,userName);
    }

    @Override
    public User deleteVo(Integer userId) {
        return getBaseMapper().deleteVo(userId);
    }
}
